package com.medvalley.tcm.dao;

import com.medvalley.tcm.domain.Organization;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author linsong
 * @date 2019/5/8 10:49
 **/

public interface OrgDao extends CrudRepository<Organization, Integer>, JpaSpecificationExecutor<Organization> {
    @Query(nativeQuery = true, value = "select * from t_organization where id in :ids")
    List<Organization> findAllByIdIn(@Param("ids") List<Integer> ids);

}
